//C++17 instroduces the constexpr keyword into the if statement

#include<iostream>

template<typename T>
auto print_type_info(const T& t) {
    if constexpr (std::is_integral<T>::value) {
        //is_integral??
        return t + 1;
    } else {
        return t + 0.001;
    }
    
}

int main() {
    std::cout<< print_type_info(5)<< std::endl;    //int    print_type_info(const int&    t);
    std::cout<< print_type_info(3.14)<< std::endl; //double print_type_info(const double& t);
    return 0;
}